Skip to main content

Save Referral Program

POST : http://<base_url>/digipay/v3/reward_promotion/referral_program

This api is used to assign bulk/internal products to the threshold of the agent and create a threshold detail

BODY PARAMS:-

ParameterTypeDescriptionValue
referral_program_titleStringunique title for referral programCustomer Program
referfrom_rewards_typeIntInteger value showing the from_reward_type if value is 1 then reward_type is in cash and if value is 3 then reward_type is points1
referto_rewards_typeIntInteger value showing the to_reward_type if value is 1 then reward_type is in cash and if value is 3 then reward_type is points1
referral_forIntit indicates user_type where user_type can be customer,agent and merchant1
expiry_dateIntunix timestamp value in second defined as expiry day of the referral_program1
min_referralsIntinteger value showing the min no of referral for user1
max_referralIntinteger value showing the max no of referral for user1
referral_reward_usersIntinteger value wh,ich is showing whether referral_reward_users are from user,to user or both user1
referral_conditionArray of stringit is the combination of refer_type,refer and transaction where refer_type shows whether referral_condition set on refer or it is set on transaction1
messageStringunique referral program message to displayhello
currency_idStringunique currency_id assigned to the referral program7753ad6bd8cf48f5b1312fd21eb36588

HEADERS:-

ParameterTypeDescriptionValue
AuthorizationStringIt is a combination of type and token to authenticate user for the given tokenToken duik7309njdlkhdauhknksadhjkas986876sd873j
CompanyIDStringCompany_id is a unique primary id, that is represent company detail76bc712200ca444fa334f9e55e5fd7a8

Request Body:-

Request Example
curl --request POST \
--url http://192.168.1.102:8014/digipay/v3/reward_promotion/referral_program \
--header 'Authorization: Token duik7309njdlkhdauhknksadhjkas986876sd873j' \
--header 'CompanyID: 7753ad6bd8cf48f5b1312fd21eb36588' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"referral_program_title": "Customer Program",
"referfrom_rewards_type": 1,
"referto_rewards_type": 1,
"referral_for": 1,
"expiry_date": 1,
"min_referrals": 1,
"max_referral": 1,
"referral_reward_users": 1,
"message": "hello",
"currency_id": "7753ad6bd8cf48f5b1312fd21eb36588"
}
'

Response:-

Response 200(OK)

{
"success": 1,
"error": [],
"data": {
"message": "Referral Program saved successfully.",
"referral_program_id": "4428647ee7ed420487cd6899f51eaa63"
}
}
Response 400(BAD REQUEST)
{
"success": 0,
"error"": [1],
"data": {
"message": "BAD_REQUEST",
}
}

RESPONSES :-

Status CodeDescription
200OK
400BAD REQUEST
404NOT FOUND
500INTERNAL SERVER ERROR